<html lang="en" xmlns:th=http://www.thymeleaf.org xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"
          integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

    <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap-theme.min.css"
          integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"
            integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
            crossorigin="anonymous"></script>

    <style>
        td {
            padding: 1rem;
            border: 1px solid gray;
            text-align: center;
        }
    </style>

</head>

<body>

<div>
    <div> gitname: <input class="gitn"></div>
    <div> gitpwd: <input class="gitp"></div>
    <div>jenkinsname: <input class="gn"></div>
    <div>jenkinspwd: <input class="gp"></div>

    <button class="upload btn btn-default" dev="daily" all="0">login</button>
</div>


<script>
    $(document).ready(function () {
        $('.upload').click(function () {


            var gitn = $(this).parent().find('.gitn').val();
            var gitp = $(this).parent().find('.gitp').val();
            var gn = $(this).parent().find('.gn').val();
            var gp = $(this).parent().find('.gp').val();
            var all = $(this).attr('all');

            $.post("/login/", {
                gitname : gitn,
                gitpwd:gitp,
                jenkinname: gn,
                jenkinspwd:gp

            }, function (data) {

                if(data=='success')
                window.location.href="/"
                else
                    alert(data)
            })
            ;
        });

    })


</script>


</body>
</html>